package com.nwpu.vote.control;

import java.util.List;
import java.util.Set;

import javax.jdo.PersistenceManager;

import com.nwpu.vote.model.*;
import com.nwpu.vote.util.PMF;
import com.nwpu.vote.util.PersistentException;

public interface VoteQuerier {
	
	enum QUERY_ORDER {
		NONE,
		ASC,
		DESC
	}
	
	public List<Vote> listRecentVotes(int count) throws PersistentException;
	public List<VoteUser> listActiveUsers(int count);
	public List<String> listPopularTags(int count);
	
    public List<Vote> getAllVotes(QUERY_ORDER createDateOrder);
    public List<VoteUser> getAllVoteUsers(QUERY_ORDER nameOrder);
    public List<Tag> getAllTags(QUERY_ORDER nameOrder);
    
    public List<Vote> listOpeningVotes() throws PersistentException;
    
    // public List<Vote> searchVote(String keywords, int start, int count) throws PersistentException;
}
